
You can, however, easily determine if a volume utilizes the AFP (Appleshare) file system, which in most cases, is adequate. To make this determination, compare the drive-queue entry's driver refnum to the Appleshare client's refnum.
The following sample code enumerates the drive queue and displays the relevant information:
main()
{
QHdrPtr DrvQHdr = GetDrvQHdr();
DrvQElPtr dqeP;
short afpRefNum = 0;
OSErr ErrNo;
// Get the Driver refNum for AFP
ErrNo = OpenDriver("\p.AFPTranslator",&afpRefNum);
// Scan each drive in the Drive Table
dqeP = (DrvQElPtr)DrvQHdr->qHead;
do {
// is it an AFP volume or SCSI device
if(dqeP->dQRefNum == afpRefNum) printf("AFP ");
} while (dqeP =(DrvQElPtr) dqeP->qLink);
}
For
other third-party file systems, such as DECNET and NFS, you have to determine
the name of their driver, and then compare it to the Appleshare client's refnum.Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help